<?php 
/**
 * Xử lý thêm manufacture mới
 */
 $man = NULL;
 if(isset($_GET['id'])){
    $man = $Bus->Manufacture->getItemById($_GET['id']);
    if(!$man){
        $url = url('errors','404');
        redirect($url);
    }
 }else{
    $url = url('errors','404');
    redirect($url);
 }
include 'component/header.php';
include 'component/slidebar.php'; 
?>
<!-- BEGIN CONTENT -->
<div id="content">
    <div class="box-out">
    	<div class="box-in">
    		<div class="box-head"><h1>Thêm một nhà sản xuất mới...</h1></div>
    		<div class="box-content">
    			<div class="form">
    				<form>
    					<fieldset>
    						<label for="small_field">Tên nhà sản xuất</label>
    						<input type="text" class="text small" disabled="true" value="<?php echo $man->manufactures_name;?>" />
    						<label for="upload_field">Logo nhà sản xuất</label>
                            <p><img src="<?php echo $man->manufactures_logo;?>" width="170" height="170" /></p>
    						<input type="file" class="file" disabled="true" />
                            <label for="select_field">Select field</label>
    						<select class="text" id="select_field" disabled="true">
    							<option value="0" <?php echo ($man->manufactures_status)?"":"selected=selected";?>>Enable</option>
    							<option value="1" <?php echo ($man->manufactures_status)?"selected='selected'":"";?>>Disable</option>
    						</select>
    						<hr />
    						<a class="submit" href="/?mod=admin&act=mans-edit&id=<?php echo $man->idmanufactures;?>">Thay đổi</a>
                            <a class="submit" href="/?mod=admin&act=mans-manager">Trang quản lý nhà sản xuất</a>
    					</fieldset>
    				</form>
    			</div><!-- end div .form -->
    		</div><!-- end div .box-content -->
    	</div><!-- end div .box-in -->
</div><!-- end div #content -->
<!-- END CONTENT -->

<?php
include 'component/footer.php'; 
?>
